package exttable.view;

import java.sql.Date;

/**
 * Created by IntelliJ IDEA.
 * User: Admin
 * Date: Jan 12, 2010
 * Time: 10:22:03 PM
 * To change this template use File | Settings | File Templates.
 */
public class ViewProbationer {
    private final int probationerId;
    private final String probationCode;
    private final Date vizitZero;
    private final int groupId;

    public static class Build implements IBuilder {
        private int probationerId;
        private String probationCode;
        private Date vizitZero;
        private int GroupId;

        public Build probationerId(int probationerId) {
            this.probationerId = probationerId;
            return this;
        }

        public Build probationCode(String probationCode) {
            this.probationCode = probationCode;
            return this;
        }

        public Build vizitZero(Date vizitZero) {
            this.vizitZero = vizitZero;
            return this;
        }

        public Build groupId(int groupid) {
            this.GroupId = groupid;
            return this;
        }

        public ViewProbationer build() {
            return new ViewProbationer(this);
        }
    }

    public ViewProbationer(Build build) {
        probationerId = build.probationerId;
        probationCode = build.probationCode;
        vizitZero = build.vizitZero;
        groupId = build.GroupId;
    }

    public int getProbationerId() {
        return probationerId;
    }

    public String getProbationCode() {
        return probationCode;
    }

    public Date getVizitZero() {
        return vizitZero;
    }

    public int getGroupId() {
        return groupId;
    }

    @Override
    public String toString() {
        return probationCode;
    }
}
